import Vue from 'vue';
import App from './App.vue';

// Vuex
import store from './store';

// Router
import router from './router';

// Http
import { post, get } from './plugins/http.js'; // 请求方式中间件
import { api } from './plugins/api.js'; // 接口

// 全局变量
Vue.prototype.$api = api;
Vue.prototype.$post = post;
Vue.prototype.$get = get;

// Vant
import Vant from 'vant';
import './assets/vant/index.less'; // 定制样式
Vue.use(Vant);
import { Toast } from 'vant';
// Vue.use(Toast);
Vue.prototype.$Toast = Toast;

// Fastclick
import fastclick from 'fastclick';
fastclick.attach(document.body);

// vue
Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
